from django.core.cache import cache
from django.http import HttpResponse


def cache_demo(request):
    response_data = cache.get('app_cache_demo')
    if not response_data:
        response_data = 'cache-demo'
        cache.set('app_cache_demo', response_data, 300)
    return HttpResponse(response_data)
